function combinArr(arr1, m, arr2, n) {
    let l1 = m - 1;
    let l2 = n - 1;
    let l = m + n - 1
    while (l2 >= 0) { // 为了l2 全放入
        if (l1 < 0) {
            arr1[l--] = arr2[l2--]
            continue
        }
        arr1[l--] = (arr1[l1] > arr2[l2]) ? arr1[l1--] : arr2[l2--]
    }
    return arr1
}

console.log(combinArr([1, 4, 6, 0, 0, 0], 3, [2, 3, 5], 3))
// 保证有序